package org.xhy.circuitbreaker;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.util.concurrent.TimeUnit;

import static java.lang.annotation.ElementType.*;

/**
 * @description:
 * @gitee: https://gitee.com/XhyQAQ
 * @copyright: B站: https://space.bilibili.com/152686439
 * @Author: Xhy
 * @CreateTime: 2024-06-04 16:28
 */

@Retention(RetentionPolicy.RUNTIME)
@Target(METHOD)
public @interface CircuitBreaker {

    double criticalFailureRate();

    String callback() default "";

    long windowSize() default 5;

    TimeUnit timeUnit() default TimeUnit.SECONDS;
}
